import {searchSpan} from "@/api/span";

export const optionParent = {
  calcHeight: 95,
  tip: false,
  searchShow: true,
  searchMenuSpan: searchSpan(1),
  border: true,
  index: true,
  viewBtn: false,
  menuWidth: 150,
  dialogWidth: 880,
  labelWidth:120,
  dialogClickModal: false,
  selection:true,
  addBtn: false,
  delBtn:false,
  // printBtn:true,
  editBtn:false,
  column: [
    {
      label: '盘点单号',
      prop: 'takeNo',
      addDisplay: false,
      editDisplay: false,
      viewDisplay:false,
      search:true,
    },
    {
      label: '盘点状态',
      prop: 'status',
      type: "select",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      dicData: [
        {
          label: "保存",
          value: 1
        },{
          label: "提交",
          value: 2
        },
        {
          label: "已审核",
          value: 3
        },
        {
          label: "执行下达",
          value: 4
        },{
          label: "正在盘点",
          value: 5
        },
        {
          label: "盘点完成",
          value: 6
        },
        {
          label: "已驳回",
          value: 7
        },
        {
          label: "已完成",
          value: 8
        },
      ],
    },
    {
      label: '盘点开始时间',
      prop: 'startTime',
      type:"datetime",
      addDisplay: false,
      editDisplay: false,
      viewDisplay:false,
    },
    {
      label: '盘点结束时间',
      prop: 'endTime',
      type:"datetime",
      addDisplay: false,
      editDisplay: false,
      viewDisplay:false,
    },
    {
      label: '盘点备注',
      prop: 'remark',
      addDisplay:false,
      editDisplay:false,
      viewDisplay: false
    },
    {
      label: '盘点总结',
      prop: 'takeCon',
      addDisplay:false,
      editDisplay:false,
      viewDisplay: false

    },
    {
      label: '创建人员',
      prop: 'createUserName',
      addDisplay: false,
      editDisplay: false,
      viewDisplay:false,
    },
    {
      label: '创建时间',
      prop: 'createTime',
      addDisplay: false,
      editDisplay: false,
      viewDisplay:false,
    },
    {
      label: '修改人员',
      prop: 'updateUserName',
      addDisplay: false,
      editDisplay: false,
      viewDisplay:false,
    },
    {
      label: '修改时间',
      prop: 'updateTime',
      addDisplay: false,
      editDisplay: false,
      viewDisplay:false,
    }
  ],
  group:[{
    label:"盘点信息",
    column: [
      {
        label: '盘点单号',
        prop: 'takeNo',
        addDisplay: false,
        editDisabled:true,
      },
      {
        label: '盘点状态',
        prop: 'status',
        type: "select",
        addDisplay: false,
        editDisplay: false,
        dicData: [
          {
            label: "保存",
            value: 1
          },{
            label: "提交",
            value: 2
          },
          {
            label: "已审核",
            value: 3
          },
          {
            label: "执行下达",
            value: 4
          },{
            label: "正在盘点",
            value: 5
          },
          {
            label: "盘点完成",
            value: 6
          },
          {
            label: "已驳回",
            value: 7
          },
          {
            label: "已完成",
            value: 8
          },
        ],
      },
      {
        label: '盘点开始时间',
        prop: 'startTime',
        type:"datetime",
        addDisplay: false,
        editDisplay: false,
      },
      {
        label: '盘点结束时间',
        prop: 'endTime',
        type:"datetime",
        addDisplay: false,
        editDisplay: false,
      },
      {
        label: '盘点备注',
        prop: 'remark',
        span:24,
        type: "textarea",
        maxlength:100,
        minRows:3,
        showWordLimit:true
      },
      {
        label: '盘点总结',
        prop: 'takeCon',
        addDisplay:false,
        editDisplay:false,
      },
      {
        label: '创建人员',
        prop: 'createUserName',
        addDisplay: false,
        editDisplay: false,
      },
      {
        label: '创建时间',
        prop: 'createTime',
        addDisplay: false,
        editDisplay: false,
      },
      {
        label: '修改人员',
        prop: 'updateUserName',
        addDisplay: false,
        editDisplay: false,
      },
      {
        label: '修改时间',
        prop: 'updateTime',
        addDisplay: false,
        editDisplay: false,
      },
      {
        title: '',
        component: 'el-divider',
        span: 24,
        labelWidth: '0px',
        params: {
          contentPosition: 'left'
        },
      },
    ],
  }]
};

export const optionChild = {
  calcHeight: 95,
  tip: false,
  searchShow: true,
  tree: true,
  border: true,
  index: true,
  viewBtn: true,
  menuWidth: 220,
  dialogWidth: 880,
  dialogClickModal: false,
  menu:false,
  addBtn:false,
  column: [
    {
      label:'物料编码',
      prop:'materialCode'
    },
    {
      label:'物料名称',
      prop:'materialName'
    },
    {
      label:'规格',
      prop:'materialSpec'
    },
    {
      label:'型号',
      prop:'materialModel'
    },
    {
      label:'零件图号',
      prop:'materialDraw'
    },
    {
      label:'物料类型',
      prop:'materialType'
    },
    {
      label:'存储区',
      prop:'areaName'
    },
    {
      label:'库存箱数',
      prop:'inventoryBox'
    },
    {
      label:'库存数量',
      prop:'inventoryNum'
    },
    {
      label:'盘点箱数',
      prop:'takeBox'
    },
    {
      label:'盘点数量',
      prop:'takeNum'
    }, {
      label: '最新统计时间',
      prop: 'updateTime'
    }
  ]
};
